package com.woniuxy.portal.service;

import com.woniuxy.comon.RedisConst;
import com.woniuxy.portal.model.dto.LoginRequest;
import com.woniuxy.portal.model.dto.UserVo;
import com.woniuxy.portal.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.http.ResponseEntity;

/**
* @author liboyang
* @description 针对表【t_user】的数据库操作Service
* @createDate 2024-10-18 14:25:01
*/
public interface UserService extends IService<User> {
    ResponseEntity<?> login(LoginRequest param);

    UserVo findById(Long id);

    User findByMobile(String mobile);

    //判断邮箱是否存在
    boolean isEmailExist(String email);

    //判断账户名是否存在
    boolean isAccountExist(String account);

    //判断电话是否存在
    boolean isMobileExist(String mobile);

    //注册成功，返回新的用户对象
    User register(User user);
}
